﻿<phone:PhoneApplicationPage
    x:Class="CustomModal.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:controls="clr-namespace:CustomModal.Controls"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid>
            <Button VerticalAlignment="Top" Content="Mostrar Modal!" Click="MostrarModal_Click"/>
        </Grid>
        <controls:Modal x:Name="MyModal">
            <Border Background="DarkGray" Padding="{StaticResource PhoneTouchTargetOverhang}">
                <Grid  VerticalAlignment="Center" >
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                        <TextBlock Text="Nombres" Style="{StaticResource PhoneTextLargeStyle}" Margin="{StaticResource PhoneVerticalMargin}"/>
                        <TextBlock Text="Apellidos" Style="{StaticResource PhoneTextLargeStyle}" Margin="{StaticResource PhoneVerticalMargin}"/>
                    </StackPanel>
                    <StackPanel Grid.Column="1">
                        <TextBox />
                        <TextBox />
                    </StackPanel>
                    <Button Grid.Row="1" Content="Ocultar Modal!" Click="OcultarModal_Click" Grid.ColumnSpan="2"/>
                </Grid>
            </Border>
        </controls:Modal>
    </Grid>

</phone:PhoneApplicationPage>